$prefix: 'el';
$state-prefix: 'is-';
@mixin namespace($block){
    $B: $prefix + '-' + $block !global;
    .#{$B}{
        @content;
    }
}

@mixin when($state){
    @at-root{
        &.#{$state-prefix + $state}{
            @content;
        }
    }
}